<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script language="javascript" type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script language="javascript" type="text/javascript"src="js/common.js"></script>
<script language="JavaScript" src="<%=basePath %>js/jquery-calendar.js"></script>
<title>Modify DailyWork</title>
<link href="css/base.css" rel="stylesheet" type="text/css" />
<link href="css/table.css" rel="stylesheet" type="text/css" />
<link href="css/jquery-calendar.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//<![CDATA[
$(document).ready(function (){
	$("#startDate").calendar({
		//初始化
		dateFormat: 'YMD/',     //日期格式
		timeSeparators:''       //时分设置
	});
});
//]]>
function test(event){
	if (event.keyCode < 48 || event.keyCode > 57 ) {
	   event.returnValue = false;
	}
}
function check() {
	document.getElementById('user_f').style.display ='';
}
function textNull1() {
	var idArray = new Array("resourceId","wrNo","taskName","work","expHrs","priority");
	var checkflg=true;
	checkflg=checkEmpty(idArray,checkflg);
	if(checkflg){
		var r = confirm("<s:text name='MSG00012'/>");
		if(r){
			document.forms["adds"].action = "daily_menu";
			document.forms["adds"].submit();
			return true;	
			}
		}
}
function back() {
	document.forms["adds"].action = "searchinfo";
	document.forms["adds"].submit();
}

function look(){
	var lookArray = new Array("test","test",1,1,1,1,1,0.1,1,"test");
	fillData(lookArray);
}
</script>
</head>
<body>

<div id="container">
<div id="header" style="padding-left: 50px;">
<h1><s:text name="CMS00003_LABEL_DAILYWORK"/></h1>
</div>
<center>
	<div id="button" style="padding:10px 10px 10px 250px;" >
		<div  style="float: left; ">
			<s:submit onclick="look();" value="Look" cssClass="ButtonCss"></s:submit>
		</div>
		<div style="float: left; padding-left: 20px;">
			<s:submit onclick="test();" value="test" cssClass="ButtonCss"></s:submit>
		</div>
	</div>
	<div id="message" align="left" style="padding:50px 0px 0px 250px;">
		<span style="color:red;">(*)</span>必須情報
	</div>
<div id="hid"  style="padding:10px 10px 100px 250px;">
<s:form theme="simple" name="adds" id="workadd" onsubmit="return false">
	<table style="width:700px; float:left; padding-left: 200px;">
		<tr>
			<td style="padding-left: 10px;">
			<table>
				<tr>
					<td class="tdString" id="resId"><s:text name ="CMS00002_LABEL_RESOURCEID"/><span style="color:red;">(*)</span></td>
					<td>
						<s:select list="dailyWorkBean.selectListBean.allUserName" 
						name = "dailyWorkBean.daily.resourceId" id="resourceId"
						listKey="key" listValue="name" headerValue="" headerKey="0" 
						cssStyle="width: 88px;" />
						<font id="f1" color="red"></font>
					</td>
				</tr>
				<tr>
					<td class="tdString"><s:text name ="CMS00003_LABEL_TEAM"/>&nbsp;</td>
					<td>
						<s:select
							list="dailyWorkBean.selectListBean.teamName" name="dailyWorkBean.daily.teamNameId" 
							listKey="key" listValue="name" headerValue="All" headerKey="0" id="teamNameId"
							cssStyle="width: 88px;">
						</s:select>
					</td>
				</tr>
				<tr>
					<td class="tdString" id="wrnumber"><s:text name ="CMS00002_LABEL_WR_NO"/><span style="color:red;">(*)</span></td>
					<td>
						<s:textfield  name="dailyWorkBean.daily.wrNo"  id="wrNo" maxLength="6" 
						cssStyle="width: 81px;" onkeypress="replace(this);"/>例：C0xxxx
					</td>
				</tr>
				<tr>
					<td class="tdString" id="task_name"><s:text name ="CMS00001_LABEL_TASKNAME"/><span style="color:red;">(*)</span></td>
					<td>
						<s:textfield name="dailyWorkBean.daily.taskName"
							id="taskName" cssStyle="width: 81px;" />
					</td>
				</tr>
				<tr>
					<td class="tdString"><s:text name ="CMS00001_LABEL_WORKTYPE"/><span style="color:red;">(*)</span></td>
					<td>
						<s:select list="dailyWorkBean.selectListBean.workTypeList"
							name="dailyWorkBean.daily.workType" id="work"
							listKey="key" listValue="name" headerValue=""
							headerKey="0" cssStyle="width: 88px;">
						</s:select>
					</td>
				</tr>
				<tr>
					<td class="tdString"><s:text name ="CMS00001_LABEL_ESTCOST"/><span style="color:red;">(*)</span></td>
					<td>
						<s:textfield name="dailyWorkBean.daily.expHrs"
							onkeypress="test(event);" id="expHrs" cssStyle="width: 81px;" cssClass="tdNumber"/></td>
				</tr>
				<tr>
					<td class="tdString"><s:text name ="COMMON_LABEL_PRIORITY"/><span style="color:red;">(*)</span></td>
					<td>
						<s:select list="dailyWorkBean.selectListBean.priorityList"
							name="dailyWorkBean.daily.priority" id="priority"
							listKey="key" listValue="name" headerValue=""
							headerKey="0" cssStyle="width: 88px;">
					</s:select>
					</td>
				</tr>
				<tr>
					<td class="tdString"><s:text name ="CMS00002_LABEL_ACTUALCOST"/></td>
					<td><s:textfield name="dailyWorkBean.daily.realHour" 
						onkeypress="test(event);" id="realHour" cssStyle="width: 81px;"  cssClass="tdNumber"/></td>
				</tr>
			</table>
			</td>
			<td style="padding-left: 80px;">
			<table>
				<tr>
					<td class="tdString"><s:text name ="CMS00002_LABEL_COST"/></td>
					<td><s:textfield name="dailyWorkBean.daily.cost" 
						onkeypress="test(event);" id="cost" cssStyle="width: 81px;"  cssClass="tdNumber"></s:textfield></td>
				</tr>
				<tr>
						<td class="tdString"><s:text name ="CMS00002_LABEL_PERCENTAGE"/></td>
						<td>
							<s:textfield name="dailyWorkBean.daily.percentage"
								onkeypress="test(event);" id="percentage" cssStyle="width: 81px;"  cssClass="tdNumber"/></td>
				</tr>
				<tr>
					<td class="tdString"><s:text name ="CMS00002_LABEL_DILIVERABLE_CNT"/></td>
					<td><s:textfield name="dailyWorkBean.daily.diliver" id="diliver"
						onkeypress="test(event);" cssStyle="width: 81px;" cssClass="tdNumber"/></td>
				</tr>
				<tr>
					<td class="tdString"><s:text name ="CMS00002_LABEL_REPDATE"/></td>
					<td><s:textfield name="dailyWorkBean.daily.startDate"
						id="startDate" cssStyle="color: blue; width: 81px;" /> 
						</td>
				</tr>
				<tr>
					<td colspan="2" class="tdString"><s:text name ="CMS00002_LABEL_COMMENT"/></td>
				</tr>
				<tr>
					<td colspan="2"><s:textarea rows="5" cols="25" id="comment"
						name="dailyWorkBean.daily.comment" cssStyle="float:left;"></s:textarea></td>
				</tr>
			</table>
			</td>
		</tr>
		<tr>
			<td align="right"></td>
			<td align="right"><s:submit value="%{getText('COMMON_BUTTON_SUBMIT')}" onclick="textNull1();" cssClass="ButtonCss"></s:submit>
		    <s:submit name="Back" value="%{getText('COMMON_BUTTON_BACK')}" cssClass="ButtonCss" onclick="back();"/></td>
		</tr>
	</table>
	<s:hidden name="dailyWorkBean.daily.id" />
	<s:hidden name="dailyWorkBean.id" />
</s:form>
</div>
</center>
<div id="footer">Copyright accenture.com.cn</div>
</div>
</body>
</html>